<%@page import="com.card.user.UserCurrency.CurrencyKind"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@page import="com.card.user.*,com.card.log.*"%>
<%@include file="m_head.jsp" %>
<%
	String id = request.getParameter("id");
	if(id == null) {
		id = "";
	}
	User user = null;
	if(id != null && !"".equals(id)) {
		user = UserUtils.getUserByPrimaryKey(id);
	}
	List<UserGoldLog> mailList = new ArrayList<UserGoldLog>();
	if(!id.isEmpty()) {
		mailList = LogUtils.getGoldLog(id,1000);
	}
%>
<body>
	<div data-role="page" id="demo-page">
		<div data-role="header">
	        <h1>房卡数:<%=admin.getGold() %></h1>
	        <a href="#myPanel" data-icon="bars" data-shadow="false" data-iconshadow="false">菜单</a>
	    </div>
		<div role="main" class="ui-content">
			<script type="text/javascript">
			function search_agent()
			{
				var search = document.getElementById("search");
				var value = search.value;
				location.href="m_user_log.jsp?id="+value;
			}
		</script>
		<input type="search" value="<%=id %>" name="id" id="search" placeholder="玩家id">
	    <br>
	    <ul data-role="listview">
				<%
					for (int i = 0; i < mailList.size(); i++) {
						UserGoldLog advice = mailList.get(i);
				%>
				<li><a href="#">
						<h4>
					<%=advice.getDate()%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					房卡数:<%=advice.getSpend()%>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					事件:<%=advice.getEvent()%> 
						</h4>
				</a></li>
				<%
					}
				%>
			</ul>
			<br>
		<input type="button" onclick="search_agent()" value="搜索">
		</div>
		
		<%@include file="m_order.jsp"%>
	</div>
</body>
</html>